package com.hnit.rol.show.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hnit.rol.commonutils.PageParam;
import com.hnit.rol.commonutils.Result;
import com.hnit.rol.model.entity.bookInfo.BookInfo;
import com.hnit.rol.model.entity.bookShow.BookShow;
import com.hnit.rol.model.vo.bookShow.BookShowVo;
import com.hnit.rol.model.vo.order.OrderInfoVo;
import com.hnit.rol.show.service.BookShowService;
import com.hnit.rol.show.mapper.BookShowMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86187
* @description 针对表【book_show】的数据库操作Service实现
* @createDate 2023-04-08 10:20:20
*/
@Service
public class BookShowServiceImpl extends ServiceImpl<BookShowMapper, BookShow>
    implements BookShowService{

    @Override
    public PageInfo<BookShowVo> getBookShowList(PageParam pageParam) {
        PageHelper.startPage(pageParam.getPageNum(),pageParam.getPageSize());
        List<BookShowVo> list = this.baseMapper.getAllBookShowList();
        PageInfo<BookShowVo> bookShowVoPageInfo = new PageInfo<>(list);
        return bookShowVoPageInfo;
    }

    @Override
    public PageInfo<BookShowVo> getBookShowListByCondition(String condition, PageParam pageParam) {
        PageHelper.startPage(pageParam.getPageNum(),pageParam.getPageSize());
        List<BookShowVo> list = this.baseMapper.getAllBookShowListByCondition(condition);
        PageInfo<BookShowVo> bookShowVoPageInfo = new PageInfo<>(list);
        return bookShowVoPageInfo;

    }

    @Override
    public PageInfo<BookShowVo> getBookShowListByBookType(String bookType, PageParam pageParam) {
        PageHelper.startPage(pageParam.getPageNum(),pageParam.getPageSize());
        List<BookShowVo> list = this.baseMapper.getAllBookShowListByBookType(bookType);
        PageInfo<BookShowVo> bookShowVoPageInfo = new PageInfo<>(list);
        return bookShowVoPageInfo;
    }
}




